<?php

session_start();

foreach ($_SESSION as $x => $y) {
    unset($_SESSION[$x]);
}
session_destroy();
header("Location: ../index.php") or die("Can not go to location");
?>